<!-- 订单 -->
<template>
  <div>
    <dispersed v-if="dispersedShow" ref="dispersedRefs"></dispersed>
    <focus v-if="focusShow" ref="focusRefs"></focus>
    <templatefour v-if="templatefourShow" ref="templatefour"></templatefour>
  </div>
</template>

<script>
  import dispersed from "../dispersed.vue"
  import focus from "../focus.vue"
  import templatefour from '../templatefour'
  export default {
    components: {
      dispersed,
      focus,
      templatefour
    },
    data() {
      return {
        id: undefined,
        childShowType: undefined,
        dispersedShow: false,
        focusShow: false,
        templatefourShow: false,
      };
    },
    mounted: function() {
      this.id = this.$route.query.id;
      this.childShowType = this.$route.query.childShowType;
      var id = this.id
      var childShowType = this.childShowType
      if (childShowType == 0) {
        this.dispersedShow = true;
        this.$nextTick(() => {
          this.$refs.dispersedRefs.init(id)
        })
      } else if (childShowType == 1) {
        this.focusShow = true;
        this.$nextTick(() => {
          this.$refs.focusRefs.init(id)
        })
      } else if (childShowType == 3) {
        this.templatefourShow = true;
        this.$nextTick(() => {
          this.$refs.templatefour.init(id)
        })
      }
    },
    created() {

    },
    methods: {

    },
    // watch: {
    //   $route(to) {
    //     if (to.path === '/common-top/fangtai/app-thotelfloor/fangtai' || to.path === '/common-top/fangtai/app-roomForcasting/roomForcastingView') {
    //       document.querySelector('.site-content__wrapper').style = 'overflow: hidden; height: calc(100vh - 20px)'
    //     } else {
    //       document.querySelector('.site-content__wrapper').style = 'height: calc(100vh - 130px); min-height: 496px; overflow: "";'
    //     }
    //   } 
    // }
  };
</script>

<style>

</style>
